
package com.gsit.job.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.UniqueConstraint;

import lombok.Data;

/**
 * An item in an SearchCriteriaService
 */
@Entity
@Data
@NamedQueries({@NamedQuery (name= "SearchCriteria.findAll",query= "select searchCriteria from SearchCriteria searchCriteria order by searchCriteria.priority")})
public class SearchCriteria {
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Long id;
	
	@Column(name = "SEARCH_QUERY")
	private String searchQuery;
	
	@Column(name = "SEARCH_DATE")
	private Date searchDate;
	
	@Column(name = "START_POSITION")
	private Integer startPosition;
	
	@Column(name = "CURRENT_POSITION")
	private Integer currentPosition;
	
	@Column(name = "END_POSITION")
	private Integer endPosition;
	
	@Column(name = "SEARCH_STATUS")
	@Enumerated(EnumType.STRING)
	private SearchStatus searchStatus;
	
	@Column(name = "SEARCH_TYPE")
	@Enumerated(EnumType.STRING)
	private SearchType searchType;
	
	
	@Column(name = "PRIORITY")
	private Integer priority;
	
	@Column(name = "URL")
	private String url;

	
	

}
